Skip to content

Addition of Inertia::response to handle both json and component #664

Closed
Sarojb31 wants to merge 5 commits intoinertiajs:1.xfrom
Sarojb31:1.x
Closed

Addition of Inertia::response to handle both json and component #664
Sarojb31 wants to merge 5 commits intoinertiajs:1.xfrom
Sarojb31:1.x

Conversation

@Sarojb31
Copy link

Addition of Inertia::reponse to allow the single route to behave as API that sends props as JSON response if the header is set to 'Accept:application/json' and behave exact to render function if the following header is not matched

It allows to send the json response from same function used to serve the Inertia Render
Headers can be passed on request Accept:application/json for the json response
By default it will work as the normal render function
@joetannenbaum
Copy link
Contributor

Closing this as we're not adding any new features or non-emergency fixes for 1.x. If this is still an issue in 2.x please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments